<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>WiFi Logger component: wifi_logger.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">WiFi Logger component
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">WiFi Logger component, uses wifi to output logs</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">wifi_logger.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="wifi__logger_8h_source.html">wifi_logger.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for wifi_logger.c:</div>
<div class="dyncontent">
<div class="center"><img src="wifi__logger_8c__incl.png" border="0" usemap="#wifi__logger_8c" alt=""/></div>
<map name="wifi__logger_8c" id="wifi__logger_8c">
<area shape="rect" id="node2" href="wifi__logger_8h.html" title="wifi_logger.h" alt="" coords="918,80,1013,107"/>
<area shape="rect" id="node3" href="tcp__handler_8h.html" title="tcp_handler.h" alt="" coords="1151,155,1251,181"/>
<area shape="rect" id="node20" href="udp__handler_8h.html" title="udp_handler.h" alt="" coords="1025,155,1127,181"/>
<area shape="rect" id="node21" href="websocket__handler_8h.html" title="websocket_handler.h" alt="" coords="733,155,878,181"/>
<area shape="rect" id="node24" href="utils_8h.html" title="utils.h" alt="" coords="1275,155,1333,181"/>
</map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a320afeaba56579760e7e3185a3d1fa02"><td class="memItemLeft" align="right" valign="top">esp_err_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi__logger_8c.html#a320afeaba56579760e7e3185a3d1fa02">init_queue</a> (void)</td></tr>
<tr class="memdesc:a320afeaba56579760e7e3185a3d1fa02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises message queue.  <a href="#a320afeaba56579760e7e3185a3d1fa02">More...</a><br /></td></tr>
<tr class="separator:a320afeaba56579760e7e3185a3d1fa02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea5e8c4231b83bde5f8f0f4556271aba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi__logger_8c.html#aea5e8c4231b83bde5f8f0f4556271aba">init_wifi</a> (void)</td></tr>
<tr class="memdesc:aea5e8c4231b83bde5f8f0f4556271aba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialises and connects to wifi.  <a href="#aea5e8c4231b83bde5f8f0f4556271aba">More...</a><br /></td></tr>
<tr class="separator:aea5e8c4231b83bde5f8f0f4556271aba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2261c877b2e047a36b7df77259b689ec"><td class="memItemLeft" align="right" valign="top">esp_err_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi__logger_8c.html#a2261c877b2e047a36b7df77259b689ec">send_to_queue</a> (const char *log_message)</td></tr>
<tr class="memdesc:a2261c877b2e047a36b7df77259b689ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends log message to message queue.  <a href="#a2261c877b2e047a36b7df77259b689ec">More...</a><br /></td></tr>
<tr class="separator:a2261c877b2e047a36b7df77259b689ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad28af408449f666a77441f0120a6a228"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi__logger_8c.html#ad28af408449f666a77441f0120a6a228">receive_from_queue</a> (void)</td></tr>
<tr class="memdesc:ad28af408449f666a77441f0120a6a228"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive data from queue.  <a href="#ad28af408449f666a77441f0120a6a228">More...</a><br /></td></tr>
<tr class="separator:ad28af408449f666a77441f0120a6a228"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a607f3b56f74b73ea4eb34e7ffeba1e82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi__logger_8c.html#a607f3b56f74b73ea4eb34e7ffeba1e82">generate_log_message</a> (esp_log_level_t level, const char *TAG, int line, const char *func, const char *fmt,...)</td></tr>
<tr class="memdesc:a607f3b56f74b73ea4eb34e7ffeba1e82"><td class="mdescLeft">&#160;</td><td class="mdescRight">generates log message, of the format generated by ESP_LOG function  <a href="#a607f3b56f74b73ea4eb34e7ffeba1e82">More...</a><br /></td></tr>
<tr class="separator:a607f3b56f74b73ea4eb34e7ffeba1e82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8e612786031d82bb0eac8affe469ed2c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wifi__logger_8c.html#a8e612786031d82bb0eac8affe469ed2c">start_wifi_logger</a> (void)</td></tr>
<tr class="memdesc:a8e612786031d82bb0eac8affe469ed2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">wrapper function to start wifi logger  <a href="#a8e612786031d82bb0eac8affe469ed2c">More...</a><br /></td></tr>
<tr class="separator:a8e612786031d82bb0eac8affe469ed2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a607f3b56f74b73ea4eb34e7ffeba1e82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a607f3b56f74b73ea4eb34e7ffeba1e82">&#9670;&nbsp;</a></span>generate_log_message()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void generate_log_message </td>
          <td>(</td>
          <td class="paramtype">esp_log_level_t&#160;</td>
          <td class="paramname"><em>level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>TAG</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>line</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fmt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>generates log message, of the format generated by ESP_LOG function </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">level</td><td>set ESP LOG level {E, W, I, D, V} </td></tr>
    <tr><td class="paramname">TAG</td><td>Tag for the log message </td></tr>
    <tr><td class="paramname">line</td><td>line </td></tr>
    <tr><td class="paramname">func</td><td>func </td></tr>
    <tr><td class="paramname">fmt</td><td>fmt </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a320afeaba56579760e7e3185a3d1fa02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a320afeaba56579760e7e3185a3d1fa02">&#9670;&nbsp;</a></span>init_queue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">esp_err_t init_queue </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialises message queue. </p>
<dl class="section return"><dt>Returns</dt><dd>esp_err_t ESP_OK - if queue init sucessfully, ESP_FAIL - if queue init failed </dd></dl>

</div>
</div>
<a id="aea5e8c4231b83bde5f8f0f4556271aba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea5e8c4231b83bde5f8f0f4556271aba">&#9670;&nbsp;</a></span>init_wifi()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void init_wifi </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialises and connects to wifi. </p>

</div>
</div>
<a id="ad28af408449f666a77441f0120a6a228"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad28af408449f666a77441f0120a6a228">&#9670;&nbsp;</a></span>receive_from_queue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* receive_from_queue </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Receive data from queue. </p>
<dl class="section return"><dt>Returns</dt><dd>char* - returns log message received from the queue, returns NULL if error or timeout </dd></dl>

</div>
</div>
<a id="a2261c877b2e047a36b7df77259b689ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2261c877b2e047a36b7df77259b689ec">&#9670;&nbsp;</a></span>send_to_queue()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">esp_err_t send_to_queue </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>log_message</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends log message to message queue. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">log_message</td><td>log message to be sent to the queue </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>esp_err_t ESP_OK - if queue init sucessfully, ESP_FAIL - if queue init failed </dd></dl>

</div>
</div>
<a id="a8e612786031d82bb0eac8affe469ed2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8e612786031d82bb0eac8affe469ed2c">&#9670;&nbsp;</a></span>start_wifi_logger()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void start_wifi_logger </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>wrapper function to start wifi logger </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
